<?php
/**
 * Core_Data_Activitytype
 *
 * @author Adrian Stolarski
 */
class Core_Data_Activitytype implements Core_Data_Mainable, Core_Data_Preparable{
    
    public $database;
    public $database_query;
    
    public function __construct() {
        $this->database = new Core_Driver_MysqlImproved;
    }
    public function main(array $variables = null) {
        $this->database->connect();
        $this->prepare_query($variables);
        $this->database->prepare($this->database_query);
        $this->database->query();
        $activity_type = array();
        while($data_activity_type = $this->database->fetch('array')){
            $activity_type[$data_activity_type['activity_type']] = $data_activity_type;
        }
        return $activity_type;
    }

    public function prepare_query(array $variables = null) {
        $this->database_query = "SELECT * FROM user_activity;";
    }

}
